<?php
if ($db = sqlite_open('foo.db3', 0666, $sqliteerror) ) { 

    sqlite_query($db, 'CREATE TABLE test (id, content, date)');
    sqlite_query($db, "INSERT INTO test VALUES ('1','hello sqlite!','2010-03-29')");
    $result = sqlite_query($db, 'select * from foo');
    
    while ($row = sqlite_fetch_array($result, SQLITE_ASSOC)) {
        echo $row['content'] . '  Date: ' . $row['date'];
    }
} else {
    die($sqliteerror);
}
?>

